/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.can.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Programador
 */
@Entity
@Table(name = "CAN_TRANSACCION_INTERNA_WEB")
@NamedQueries({@NamedQuery(name = "TransaccionInternaWeb.findAll", query = "SELECT t FROM TransaccionInternaWeb t"), @NamedQuery(name = "TransaccionInternaWeb.findByIdTransaccionInternaWeb", query = "SELECT t FROM TransaccionInternaWeb t WHERE t.idTransaccionInternaWeb = :idTransaccionInternaWeb")})
public class TransaccionInternaWeb implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TRANSACCION_INTERNA_WEB", nullable = false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long idTransaccionInternaWeb;
    @JoinColumn(name = "FID_CAN_TRANSACCION_WEB", referencedColumnName = "ID_TRANSACCION_WEB")
    @ManyToOne(fetch = FetchType.LAZY)
    private TransaccionWeb fidCanTransaccionWeb;

    public TransaccionInternaWeb() {
    }

    public TransaccionInternaWeb(Long idTransaccionInternaWeb) {
        this.idTransaccionInternaWeb = idTransaccionInternaWeb;
    }

    public Long getIdTransaccionInternaWeb() {
        return idTransaccionInternaWeb;
    }

    public void setIdTransaccionInternaWeb(Long idTransaccionInternaWeb) {
        this.idTransaccionInternaWeb = idTransaccionInternaWeb;
    }

    public TransaccionWeb getFidCanTransaccionWeb() {
        return fidCanTransaccionWeb;
    }

    public void setFidCanTransaccionWeb(TransaccionWeb fidCanTransaccionWeb) {
        this.fidCanTransaccionWeb = fidCanTransaccionWeb;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTransaccionInternaWeb != null ? idTransaccionInternaWeb.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TransaccionInternaWeb)) {
            return false;
        }
        TransaccionInternaWeb other = (TransaccionInternaWeb) object;
        if ((this.idTransaccionInternaWeb == null && other.idTransaccionInternaWeb != null) || (this.idTransaccionInternaWeb != null && !this.idTransaccionInternaWeb.equals(other.idTransaccionInternaWeb))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.can.be.TransaccionInternaWeb[idTransaccionInternaWeb=" + idTransaccionInternaWeb + "]";
    }

}
